/*
 * @Author: liuzelin
 * @Date: 2024-04-14 12:18:56
 * @LastEditors: liuzelin
 * @LastEditTime: 2024-05-12 21:28:19
 * @Description: file content
 */
#pragma once

#include "uv.h"

namespace PandaImpl {
class UVHelper {
 public:
  static void UVCloseCb(uv_handle_t* handle);
  static void UVOnAllocCb(uv_handle_t* handle, size_t size, uv_buf_t* buf);
  static void UVReadCb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
  static void UVConnectCb(uv_connect_t* req, int status);
  static void UVConnectionCb(uv_stream_t* server, int status);
  static void UVUdpRecvCb(uv_udp_t* handle, ssize_t nread, const uv_buf_t* buf,
                          const struct sockaddr* addr, unsigned flags);
  static void UVOnUDPSendCb(uv_udp_send_t* req, int status);
  static void UVOnTCPSendCb(uv_write_t* req, int status);
  static void UVTimerCb(uv_timer_t* handle);
  static void UVAsyncCb(uv_async_t* handle);
  static void UVResolverCb(uv_getaddrinfo_t* req, int status,
                           struct addrinfo* res);
};
}  // namespace PandaImpl
